#@layout()

#define content()
    <section class="content-header">
        <div class="container-fluid">
            <div class="row">
                <div class="col-sm-6">

                    <div class="row mb-2">
                        <div class="col-sm-12">
                            <h1>
                                提现管理
                                <small data-toggle="tooltip" title="" data-placement="right"
                                       data-trigger="hover"><i class="nav-icon far fa-question-circle"></i></small>
                                <small> 首页 / 财务 / 提现管理</small>
                            </h1>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-12" style="padding-top: 20px">
                            <a href="#(CPATH)/admin/finance/payout">全部 (#(totalCount ?? 0))</a> |
                            <a href="?status=1">提现中 (#(payingCount ?? 0))</a> |
                            <a href="?status=9">已成功 (#(successCount ?? 0))</a> |
                            <a href="?status=2" style="color: #a00">已拒绝 (#(refuseCount ?? 0))</a>
                        </div>
                    </div>

                </div>

            </div>

        </div><!-- /.container-fluid -->
    </section>


    <section class="content">

        <div class="container-fluid">
                <div class="card card-outline card-primary">
                    <div class="card-header with-border">
                        <form class=" admin-search-panel" action="" method="get">
                            <input type="hidden" name="status" value="#para('status')">
                            <div class="row">
                                <div class="form-group col-lg-2">
                                        <input type="text" placeholder="流水号" class="form-control" name="ns" value="#para('ns')">
                                </div>
                                <div class="form-group col-lg-2">
                                        <button type="submit" class="btn btn-primary ">查询</button>
                                        <button type="reset" class="btn btn-default">重置</button>
                                </div>
                            </div>
                            <!-- /.card-body -->
                        </form>


                    </div>
                    <!-- /.card-header -->
                    <div class="card-body p-0">

                        <table class="table table-striped">
                            <tbody>
                            <tr>

                                <th style="width: 150px">用户</th>
                                <th style="width: 150px">真实名字</th>
                                <th style="width: 100px">提现金额</th>
                                <th style="width: 70px">手续费</th>
                                <th>支付类型</th>
                                <th>支付账号</th>
                                <th style="width: 150px">状态</th>
                                <th style="width: 80px">操作</th>
                            </tr>

                            #for(item : page.list ??)
                            <tr>
                                <td>
                                    <a href="#(CPATH)/admin/user/detail/#(item.user_id)">
                                    #(item.user.nickname ??)
                                    </a>
                                </td>
                                <td>
                                    #(item.user_real_name)
                                </td>
                                <td>
                                    #number(item.amount,"0.00")
                                </td>
                                <td>
                                    #number(item.fee,"0.00")
                                </td>
                                <td>
                                    #(item.payTypeStr ??)
                                </td>
                                <td>
                                    #(item.pay_to ??)
                                </td>
                                <td>
                                    #(item.statusStr ??)
                                </td>
                                <td>
                                    <a href="#(CPATH)/admin/finance/payoutdetail/#(item.id)" >详情</a>
                                </td>
                            </tr>
                            #else
                            <tr class="nodata"><td colspan="999">暂无数据</td> </tr>
                            #end

                            </tbody>
                        </table>
                    </div>
                    <!-- /.card-body -->
                    <div class="card-footer">
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="row">

                                    <div class="form-group">
                                        <div class="form-check">
                                            <input class="form-check-input tableCheckAll" id="checkall" type="checkbox" >
                                            <label class="form-check-label" for="checkall">全选</label>
                                        </div>
                                    </div>
                                    <div class="form-group col-lg-3">
                                        <select class="form-control" name="action">
                                            <option value="">请选择...</option>
                                            <option value="doDelByIds" open-type="del-confirm">
                                                批量删除
                                            </option>
                                        </select>
                                    </div>

                                    <div class="form-group col-lg-3">
                                        <button type="button" class="btn btn-outline-primary batchExec">批量操作</button>
                                    </div>
                                </div>
                            </div>

                            <div class="col-sm-6">
                                #@_paginate()
                            </div>
                        </div>
                    </div>
                    <!-- /.card-footer -->
                </div>
                <!-- /.card -->
            </div>
    </section>
#end
